{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "pth_path = \"E:\\\\workspace\\\\SOMatch\\\\weights\\\\checkpoint_checkpoint_1165.pth\"\n",
    "model_dict = torch.load(pth_path, map_location='cpu')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['FtsA', 'FtsB', 'Fts'])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_dict.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['state', 'param_groups'])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_dict['Fts'].keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "torch.save(model_dict['FtsA'], \"E:\\\\workspace\\\\SOMatch\\\\weights\\\\checkpoint_FtsA_1165.pth\")\n",
    "torch.save(model_dict['FtsB'], \"E:\\\\workspace\\\\SOMatch\\\\weights\\\\checkpoint_FtsB_1165.pth\")\n",
    "torch.save(model_dict['Fts'], \"E:\\\\workspace\\\\SOMatch\\\\weights\\\\checkpoint_Fts_1165.pth\")"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "51841aac250726aedc56a862f89d83e78060fd4cea0505854b368a1ccee61d84"
  },
  "kernelspec": {
   "display_name": "Python 3.6.15 ('SOMatch36')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
